namespace hjc {

    export class AssetAdapter implements eui.IAssetAdapter {

        public getAsset(source: string, completed: Function, context: any): void {
            if (RES.hasRes(source)) {
                if (!!RES.getRes(source)) utils.call(completed, context, RES.getRes(source), source);
                else RES.getResAsync(source, () => utils.call(completed, this, RES.getRes(source), source), this);
            } else RES.getResByUrl(source, () => utils.call(completed, this, RES.getRes(source), source),
                this, RES.ResourceItem.TYPE_IMAGE);
        }
    }

}

